<layout name="layout" />

<script src="{$uri}Public/Scripts/PSI/Warehouse/WarehouseField.js?dt={$dtFlag}" type="text/javascript"></script>
<script src="{$uri}Public/Scripts/PSI/User/UserField.js?dt={$dtFlag}" type="text/javascript"></script>
<script src="{$uri}Public/Scripts/PSI/Customer/CustomerField.js?dt={$dtFlag}" type="text/javascript"></script>
<script src="{$uri}Public/Scripts/PSI/Goods/GoodsWithSalePriceField.js?dt={$dtFlag}" type="text/javascript"></script>
<script src="{$uri}Public/Scripts/PSI/Goods/GoodsField.js?dt={$dtFlag}" type="text/javascript"></script>


<script src="{$uri}Public/Scripts/PSI/Sale/SRMainForm.js?dt={$dtFlag}" type="text/javascript"></script>
<script src="{$uri}Public/Scripts/PSI/Sale/SREditForm.js?dt={$dtFlag}" type="text/javascript"></script>
<script src="{$uri}Public/Scripts/PSI/Sale/SRSelectWSBillForm.js?dt={$dtFlag}" type="text/javascript"></script>

<script src="{$uri}Public/Scripts/PSI/UX/CellEditing.js?dt={$dtFlag}" type="text/javascript"></script>

<script src="{$uri}Public/Lodop/LodopFuncs.js?dt={$dtFlag}" type="text/javascript"></script>

<script>
    Ext.onReady(function() {
        var app = Ext.create("PSI.App", {
            userName: "{$loginUserName}",
            productionName: "{$productionName}"
        });

        var permission = {
            add: "{$pAdd}",
            edit: "{$pEdit}",
            del: "{$pDelete}",
            commit: "{$pCommit}",
            genPDF: "{$pGenPDF}",
            print: "{$pPrint}",
            verify: "{$pVerify}",
            unVerify: "{$pUnVerify}",
            tmsOrder: "{$pTMSOrder}",
        };
        app.add(Ext.create("PSI.Sale.SRMainForm", {
            permission: permission
        }));
        app.setAppHeader({
            title: "{$title}",
            iconCls: "PSI-fid2006"
        });
    });
</script>